package com.ants.boot.system.dto.sysuser;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 蚂蚁会花呗
 * @date 2022/3/17 15:12
 */
@ApiModel(value = "用户新增对象")
public class AddUserDto {

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名",required = true)
    @NotBlank(message = "用户名不能为空！")
    @Size(min = 2, max = 20,message = "长度在2到20")
    private String username;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码",required = true)
    private String password;

    /**
     * 年龄
     */
    @ApiModelProperty(value = "年龄")
    private Integer age;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "用户昵称",required = true)
    @NotBlank(message = "用户昵称不能为空！")
    private String nickName;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "手机号码",required = true)
    @Pattern(regexp = "^13[0-9]{9}|(15[0-35-9]|18[0123456789]|14[57]|17[0-9])[0-9]{8}$", message = "手机号码不正确")
    private String phoneNumber;

    /**
     * 邮箱地址
     */
    @ApiModelProperty(value = "邮箱信息")
    @Email(message = "邮箱格式不正确")
    private String email;

    @ApiModelProperty(value = "角色id列表")
    private List<Integer> roleIds = new ArrayList<>();

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态", required = true)
    private String status;

    @ApiModelProperty(value = "微信openid")
    private String openid;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public List<Integer> getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(List<Integer> roleIds) {
        this.roleIds = roleIds;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }
}
